<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    request.setAttribute("contextPath", request.getContextPath());
%>
<html>
<head>
<script>
function check(obj)
{

    if(obj.value.length==0)
	{
	alert("can't be empty");
	obj.focus();
	}
}
</script>
<title>updateContactDetail</title>
</head>
<body>
  <form action="${contextPath }/profile/updateContactDetail" method="post">  
	   <input type="hidden" value="${contactDetail.userId}" name="userId"> 
	   <input type="hidden" value="${contactDetail.shoppingContactId}" name="shoppingContactId">
	   <table width="80%" border="1">
		  <tr>
		      <td>province</td>
		      <td><input type="text" value="${contactDetail.province} " name="province" onblur="check(this)"></td>
		  </tr>
		  <tr>
		      <td>city</td>
		      <td><input type="text" value="${contactDetail.city} " name="city" onblur="check(this)"></td>
		  </tr>
		  <tr>
		      <td>suburb</td>
		      <td><input type="text" value="${contactDetail.suburb} " name="suburb" onblur="check(this)"></td>
		  </tr>
		  <tr>
		      <td>road</td>
		      <td><input type="text" value="${contactDetail.road} " name="road" onblur="check(this)"></td>
		  </tr>
		  <tr>
		      <td>phoneNumber</td>
		      <td><input type="text" value="${contactDetail.phoneNumber} " name="phoneNumber" onblur="check(this)"></td>
		  </tr>
		  <tr>
		      <td>contactPerson</td>
		      <td><input type="text" value="${contactDetail.contactPerson} " name="contactPerson" onblur="check(this)"></td>
		  </tr>
		  
	  </table>
	  <input type="submit" value="Update"/>
      <input type="reset" value="Reset"/>
  </form>
</body>
</html>